package com.example.mountainwalker.service.impl;

import com.example.mountainwalker.entity.ScenicSpotInfo;
import com.example.mountainwalker.mapper.ScenicSpotMapper;
import com.example.mountainwalker.service.ScenicSpotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScenicSpotServiceImpl implements ScenicSpotService {
    @Autowired
    private ScenicSpotMapper scenicSpotMapper;

    @Override
    public List<ScenicSpotInfo> getScenicSpotList() {
        return scenicSpotMapper.getScenicSpotList();
    }

    @Override
    public ScenicSpotInfo getScenicSpotById(Integer id) {
        return scenicSpotMapper.getScenicSpotById(id);
    }

    @Override
    public int deleteScenicSpotById(Integer id) {
        return scenicSpotMapper.deleteScenicSpotById(id);
    }

    @Override
    public int addScenicSpot(ScenicSpotInfo scenicSpotInfo) {
        return scenicSpotMapper.addScenicSpot(scenicSpotInfo);
    }

    @Override
    public int updateScenicSpot(ScenicSpotInfo scenicSpotInfo) {
        return scenicSpotMapper.updateScenicSpot(scenicSpotInfo);
    }
}